#ifndef _INPUT_H
#define _INPUT_H

#include <bios.h>
#include "BOOLEAN.H"

#define MOUSE_LEFT		0x00
#define MOUSE_RIGHT		0x01
#define MOUSE_MIDDLE	0x02

#ifndef _WORD_
#define _WORD_
typedef unsigned short word;
#endif
#ifndef _BYTE_
#define _BYTE_
typedef unsigned char byte;
#endif

typedef struct{
	word x;
	word y;
	byte buttonState;
} MouseState;

int getKey(void);

boolean initMouse(byte *numButtons);
void showMouseCursor(void);
void hideMouseCursor(void);
MouseState getMouseState(void);
void setMouseState(MouseState state);
short getMousePress(byte button, MouseState *state);
short getMouseRelease(byte button, MouseState *state);
void boundMouseHorizontal(word min, word max);
void boundMouseVertical(word min, word max);
void getMouseMotion(short *x, short *y);
void boundMouse(word left, word top, word right, word bottom);

#endif
